\hypertarget{classc_fx}{\section{c\-Fx类 参考}
\label{classc_fx}\index{c\-Fx@{c\-Fx}}
}


特效类，用于方便使用\-Shader.  




{\ttfamily \#include $<$c\-Fx.\-h$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_fx_a80a80b4f71a9fb9d57c736556f4b87a9}{{\bfseries c\-Fx} (I\-Direct3\-D\-Device9 $\ast$p\-Device)}\label{classc_fx_a80a80b4f71a9fb9d57c736556f4b87a9}

\item 
\hypertarget{classc_fx_a4fdc52ce06020c90223150fec77f73aa}{void {\bfseries load\-\_\-fx} (const char $\ast$File\-Name)}\label{classc_fx_a4fdc52ce06020c90223150fec77f73aa}

\item 
\hypertarget{classc_fx_a37e38ef03859d9dfd574179339bf578b}{void {\bfseries apply} (char $\ast$Technique\-Name, void($\ast$fuc)())}\label{classc_fx_a37e38ef03859d9dfd574179339bf578b}

\item 
\hypertarget{classc_fx_a1b92db871f880d83dfc7f8c47cef3285}{void \hyperlink{classc_fx_a1b92db871f880d83dfc7f8c47cef3285}{apply} (char $\ast$Technique\-Name, \hyperlink{classc_terrain}{c\-Terrain} $\ast$p\-Terrain, void(c\-Terrain\-::$\ast$fuc)())}\label{classc_fx_a1b92db871f880d83dfc7f8c47cef3285}

\begin{DoxyCompactList}\small\item\em (p\-Terrain-\/$>$$\ast$成员函数指针)(); 忘了是不是自己发明的。 \end{DoxyCompactList}\item 
\hypertarget{classc_fx_aa5d6617367a0821e073485bbcf1c0340}{void \hyperlink{classc_fx_aa5d6617367a0821e073485bbcf1c0340}{apply} (char $\ast$Technique\-Name, \hyperlink{classc_terrain_v1}{c\-Terrain\-V1} $\ast$p\-Terrain, void(c\-Terrain\-V1\-::$\ast$fuc)())}\label{classc_fx_aa5d6617367a0821e073485bbcf1c0340}

\begin{DoxyCompactList}\small\item\em (p\-Terrain-\/$>$$\ast$成员函数指针)(); \end{DoxyCompactList}\item 
\hypertarget{classc_fx_a590fb527a8864b727b5aab9de8bf26e5}{I\-D3\-D\-X\-Effect $\ast$ {\bfseries get\-\_\-effect} ()}\label{classc_fx_a590fb527a8864b727b5aab9de8bf26e5}

\item 
\hypertarget{classc_fx_a226bd1c0d55a4645262059bf15899e37}{void {\bfseries modify\-\_\-matrix} (char $\ast$Name, D3\-D\-X\-M\-A\-T\-R\-I\-X \&t)}\label{classc_fx_a226bd1c0d55a4645262059bf15899e37}

\item 
\hypertarget{classc_fx_a477b8fd03dbf2c96cf56b9aff3de417f}{void {\bfseries modify\-\_\-float} (char $\ast$Name, float t)}\label{classc_fx_a477b8fd03dbf2c96cf56b9aff3de417f}

\item 
\hypertarget{classc_fx_a87cd0624ea462b33657f4164658e666e}{void {\bfseries modify\-\_\-vector} (char $\ast$Name, D3\-D\-X\-V\-E\-C\-T\-O\-R4 \&v)}\label{classc_fx_a87cd0624ea462b33657f4164658e666e}

\item 
\hypertarget{classc_fx_a686cf69966f00593d5b833570db651b4}{void {\bfseries modify\-\_\-value} (char $\ast$Name, const void $\ast$p, int Size)}\label{classc_fx_a686cf69966f00593d5b833570db651b4}

\item 
\hypertarget{classc_fx_a2f32d7c170aab5fdacf41cbfd4a1da58}{void {\bfseries set\-\_\-texture} (char $\ast$Name, I\-Direct3\-D\-Texture9 $\ast$p\-Texture)}\label{classc_fx_a2f32d7c170aab5fdacf41cbfd4a1da58}

\item 
\hypertarget{classc_fx_ab25bdc4e2c807858f3a7b7db8788e76c}{void {\bfseries set\-\_\-float4} (char $\ast$Name, void $\ast$p)}\label{classc_fx_ab25bdc4e2c807858f3a7b7db8788e76c}

\item 
\hypertarget{classc_fx_a69a93a4969b7e552e0c83105c3adf784}{void {\bfseries set\-\_\-float\-\_\-array} (char $\ast$Name, float $\ast$p, int num)}\label{classc_fx_a69a93a4969b7e552e0c83105c3adf784}

\item 
\hypertarget{classc_fx_adc60df11f900550e9d17fedddfdb450c}{void {\bfseries commit\-Changes} ()}\label{classc_fx_adc60df11f900550e9d17fedddfdb450c}

\item 
void \hyperlink{classc_fx_a8bc4dcc7742d671bdf7f47880f8e8d89}{update\-Shader\-Matrix} (D3\-D\-X\-M\-A\-T\-R\-I\-X \&World, D3\-D\-X\-M\-A\-T\-R\-I\-X \&View, D3\-D\-X\-M\-A\-T\-R\-I\-X Proj, char $\ast$mat\-World\-Name=\char`\"{}g\-\_\-\-World\-Matrix\char`\"{}, char $\ast$mat\-World\-Inverse\-Transpose\-Name=\char`\"{}g\-\_\-\-World\-Inverse\-Transpose\-Matrix\char`\"{}, char $\ast$mat\-W\-V\-P\-Name=\char`\"{}g\-\_\-\-World\-View\-Proj\-Matrix\char`\"{})
\item 
\hypertarget{classc_fx_a16a6ebd51be05fe26699b46d79f22696}{void {\bfseries update\-Shader\-Material\-Light} (D3\-D\-X\-C\-O\-L\-O\-R \&Ambient\-Light, D3\-D\-X\-C\-O\-L\-O\-R \&Ambient\-Matrial, D3\-D\-X\-C\-O\-L\-O\-R \&Diffuse\-Light, D3\-D\-X\-C\-O\-L\-O\-R \&Diffuse\-Matrial, D3\-D\-X\-C\-O\-L\-O\-R \&Spec\-Light, D3\-D\-X\-C\-O\-L\-O\-R \&Spec\-Material, float Spec\-Pow, char $\ast$Ambient\-Light\-Name=\char`\"{}g\-\_\-\-Ambient\-Light\char`\"{}, char $\ast$Ambient\-Matrial\-Name=\char`\"{}g\-\_\-\-Ambient\-Material\char`\"{}, char $\ast$Diffuse\-Light\-Name=\char`\"{}g\-\_\-\-Diffuse\-Light\char`\"{}, char $\ast$Diffuse\-Matrial\-Name=\char`\"{}g\-\_\-\-Diffuse\-Matrial\char`\"{}, char $\ast$Spec\-Light\-Name=\char`\"{}g\-\_\-\-Spec\-Light\char`\"{}, char $\ast$Spec\-Material\-Name=\char`\"{}g\-\_\-\-Spec\-Material\char`\"{}, char $\ast$Spec\-Pow\-Name=\char`\"{}g\-\_\-\-Spec\-Pow\char`\"{})}\label{classc_fx_a16a6ebd51be05fe26699b46d79f22696}

\item 
\hypertarget{classc_fx_a7da7df52a3f6d157103d25c5050326f8}{void {\bfseries set\-Shader\-Material} (D3\-D\-X\-C\-O\-L\-O\-R \&Ambient\-Matrial, D3\-D\-X\-C\-O\-L\-O\-R \&Diffuse\-Matrial, D3\-D\-X\-C\-O\-L\-O\-R \&Spec\-Material, float Spec\-Pow, char $\ast$Ambient\-Matrial\-Name=\char`\"{}g\-\_\-\-Ambient\-Material\char`\"{}, char $\ast$Diffuse\-Matrial\-Name=\char`\"{}g\-\_\-\-Diffuse\-Matrial\char`\"{}, char $\ast$Spec\-Material\-Name=\char`\"{}g\-\_\-\-Spec\-Material\char`\"{}, char $\ast$Spec\-Pow\-Name=\char`\"{}g\-\_\-\-Spec\-Pow\char`\"{})}\label{classc_fx_a7da7df52a3f6d157103d25c5050326f8}

\end{DoxyCompactItemize}
\subsection*{Protected 属性}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_fx_a6f685c7e684093d1165f9201c0689b97}{I\-Direct3\-D\-Device9 $\ast$ {\bfseries \-\_\-p\-Device}}\label{classc_fx_a6f685c7e684093d1165f9201c0689b97}

\item 
\hypertarget{classc_fx_a2c8a7d580cd53540433e8915f42e5d9f}{I\-D3\-D\-X\-Effect $\ast$ {\bfseries \-\_\-p\-Effect}}\label{classc_fx_a2c8a7d580cd53540433e8915f42e5d9f}

\item 
\hypertarget{classc_fx_a4c0c66f5b8ad2f46c9a957c96c34d032}{int {\bfseries \-\_\-r}}\label{classc_fx_a4c0c66f5b8ad2f46c9a957c96c34d032}

\end{DoxyCompactItemize}


\subsection{详细描述}
特效类，用于方便使用\-Shader. 

需要前导词： class \hyperlink{classc_terrain}{c\-Terrain}; class \hyperlink{classc_terrain_v1}{c\-Terrain\-V1}; 

\subsection{成员函数说明}
\hypertarget{classc_fx_a8bc4dcc7742d671bdf7f47880f8e8d89}{\index{c\-Fx@{c\-Fx}!update\-Shader\-Matrix@{update\-Shader\-Matrix}}
\index{update\-Shader\-Matrix@{update\-Shader\-Matrix}!cFx@{c\-Fx}}
\subsubsection[{update\-Shader\-Matrix}]{\setlength{\rightskip}{0pt plus 5cm}void c\-Fx\-::update\-Shader\-Matrix (
\begin{DoxyParamCaption}
\item[{D3\-D\-X\-M\-A\-T\-R\-I\-X \&}]{World, }
\item[{D3\-D\-X\-M\-A\-T\-R\-I\-X \&}]{View, }
\item[{D3\-D\-X\-M\-A\-T\-R\-I\-X}]{Proj, }
\item[{char $\ast$}]{mat\-World\-Name = {\ttfamily \char`\"{}g\-\_\-WorldMatrix\char`\"{}}, }
\item[{char $\ast$}]{mat\-World\-Inverse\-Transpose\-Name = {\ttfamily \char`\"{}g\-\_\-WorldInverseTransposeMatrix\char`\"{}}, }
\item[{char $\ast$}]{mat\-W\-V\-P\-Name = {\ttfamily \char`\"{}g\-\_\-WorldViewProjMatrix\char`\"{}}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classc_fx_a8bc4dcc7742d671bdf7f47880f8e8d89}
\begin{DoxyRemark}{备注}
如果将shader里的各主要矩阵名固定就能减轻不少负担 世界矩阵变了，其他的都要改 
\end{DoxyRemark}


该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
E\-:/!代码工厂/3\-D引擎/c\-Fx.\-h\end{DoxyCompactItemize}
